package com.ddwl.gate.domain.gaode.api;


import com.ddwl.gate.domain.gaode.api.vo.PoiResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(url = "https://restapi.amap.com/",name="gaode")
public interface GaoDeApi {


    /**
     * 关键字搜索
     * @param map
     * @return
     */
    @PostMapping(value = "/v5/place/text",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    PoiResp queryPoi(@RequestParam Map<String, Object> map);

    /**
     * 周边搜索
     * @param map
     * @return
     */
    @PostMapping(value = "/v5/place/around?parameters",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    PoiResp queryAroundPoi(@RequestParam Map<String, Object> map);
}
